/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f7f9fc;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* App 容器样式 */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部导航栏 */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e88e5;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-item {
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background-color: #f0f7ff;
    color: #1e88e5;
}

.nav-item.active {
    color: #1e88e5;
    background-color: #f0f7ff;
    position: relative;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #1e88e5;
    border-radius: 2px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #eaeaea;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.username {
    font-weight: 500;
}

/* 主内容区域 */
.app-content {
    flex: 1;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #2c3e50;
}

/* 预约选项卡 */
.tabs {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 25px;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid #eaeaea;
    background-color: #fafafa;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: #1e88e5;
}

.tab-btn.active {
    color: #1e88e5;
    background-color: white;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #1e88e5;
}

.badge {
    display: inline-block;
    background-color: #e1effe;
    color: #1e88e5;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 5px;
}

.tab-content {
    display: none;
    padding: 25px;
}

.tab-content.active {
    display: block;
}

/* 预约卡片 */
.appointment-card {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.appointment-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eaeaea;
}

.appointment-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.appointment-status {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.upcoming {
    background-color: #e3f2fd;
    color: #1565c0;
}

.ongoing {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.completed {
    background-color: #f5f5f5;
    color: #616161;
}

.appointment-body {
    padding: 20px;
}

.appointment-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    color: #666;
}

.info-item i {
    margin-right: 10px;
    color: #1e88e5;
    font-size: 1rem;
    width: 20px;
}

.appointment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.action-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-cancel {
    color: #f44336;
    border: 1px solid #f44336;
}

.action-cancel:hover {
    background-color: #ffebee;
}

.action-reschedule {
    color: #ff9800;
    border: 1px solid #ff9800;
}

.action-reschedule:hover {
    background-color: #fff3e0;
}

.action-join {
    color: white;
    background-color: #1e88e5;
}

.action-join:hover {
    background-color: #1976d2;
}

.action-contact {
    color: #1e88e5;
    border: 1px solid #1e88e5;
}

.action-contact:hover {
    background-color: #e3f2fd;
}

.action-rate, .action-details {
    color: #5e35b1;
    border: 1px solid #5e35b1;
}

.action-rate:hover, .action-details:hover {
    background-color: #f3e5f5;
}

/* 新增预约按钮 */
.new-appointment {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.new-appointment-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: #1e88e5;
    color: white;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

.new-appointment-btn:hover {
    background-color: #1976d2;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.4);
    transform: translateY(-2px);
}

.new-appointment-btn i {
    font-size: 1rem;
}

/* 加载中 */
.loading-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 15px;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #e0e0e0;
    border-top-color: #1e88e5;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    color: #9e9e9e;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #bdbdbd;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* 通用按钮样式 */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.primary-btn {
    background-color: #1e88e5;
    color: white;
}

.primary-btn:hover {
    background-color: #1976d2;
}

.secondary-btn {
    background-color: #f5f5f5;
    color: #616161;
}

.secondary-btn:hover {
    background-color: #e0e0e0;
}

.danger-btn {
    background-color: #f44336;
    color: white;
}

.danger-btn:hover {
    background-color: #e53935;
}

/* 页脚 */
.app-footer {
    background-color: #263238;
    color: #b0bec5;
    padding: 20px 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* 模态窗口 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eaeaea;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.close-modal-btn {
    font-size: 1.2rem;
    color: #9e9e9e;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal-btn:hover {
    color: #f44336;
}

.modal-body {
    padding: 20px;
}

.warning-text {
    color: #f44336;
    margin-top: 10px;
    font-size: 0.9rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #eaeaea;
    background-color: #fafafa;
}

/* 评价表单样式 */
.rating-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rating-stars {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.rating-star {
    font-size: 1.5rem;
    color: #d1d1d1;
    cursor: pointer;
    transition: color 0.3s ease;
}

.rating-star:hover,
.rating-star.selected {
    color: #ffc107;
}

.rating-comment-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-comment-container label {
    font-weight: 500;
}

#rating-comment {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    font-size: 0.9rem;
}

#rating-comment:focus {
    border-color: #1e88e5;
    outline: none;
}

/* 消息提示 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(33, 33, 33, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(100px);
    opacity: 0;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background-color: rgba(46, 125, 50, 0.9);
}

.toast-error {
    background-color: rgba(211, 47, 47, 0.9);
}

.toast-info {
    background-color: rgba(25, 118, 210, 0.9);
}

/* 响应式样式 */
@media (max-width: 992px) {
    .appointment-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: 10px 15px;
        flex-wrap: wrap;
    }
    
    .logo {
        flex: 1;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        margin-top: 10px;
        justify-content: space-between;
        gap: 5px;
    }
    
    .nav-item {
        flex: 1;
        text-align: center;
        font-size: 0.9rem;
        padding: 8px 0;
    }
    
    .user-info {
        flex: 0;
    }
    
    .appointment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .appointment-status {
        align-self: flex-start;
    }
    
    .appointment-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-btn {
        text-align: center;
    }
    
    .app-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .page-title {
        text-align: center;
    }
    
    .tab-btn {
        font-size: 0.9rem;
        padding: 10px 5px;
    }
} 